#define _CRT_SECURE_NO_WARNINGS 1
#include "contact.h"

int main()
{
	int input = 0;
	Con book;
	Init_Con(&book);
	do {
		menu();
		printf("\n请输入选项>");
		scanf("%d", &input);
		switch (input)
		{
		case Add:
			Add_message(&book);
			break;
		case Del:
			Delete_message(&book);
			break;
		case Search:
			Search_message(&book);
			break;
		case Modify:
			Modify_message(&book);
			break;
		case Display:
			Display_book(&book);
			break;
		case Empty:
			Empty_book(&book);
			break;
		case Sort_name:
			sort_name(&book);
			break;
		case Exit:
			printf("退出系统\n");
			Release_con(&book);
			break;
		default:
			printf("选择错误\n");
			break;
		}
	} while (input);


	return 0;
}